<?php
	if($data)
	{
			echo '<table width = "795" cellpadding = "5" cellspacing = "2" border = "0" align = "center" bgcolor = "#D4D0C8">';
			echo '<tr> <th colspan = "6"> DANH SÁCH KHÁCH HÀNG </th> </tr>';
			echo '<tr class = "list"> 
				<td width = "150" valign = "top"> <div align = "center"> <b> Khách hàng </b> </div> </td>
				<td width = "260" valign = "top"> <div align = "center"> <b> Địa chỉ  </b> </div> </td>
				<td width = "100" valign = "top"> <div align = "center"> <b> Số điện thoại </b> </div> </td>
				<td width = "50" valign = "top"> <div align = "center"> <img src="public/images/b_edit.png"/> Sửa</div> </td>
				<td width = "50" valign = "top"> <div align = "center"> <img src="public/images/b_drop.png"/> Xóa </div> </td>
			</tr>';
		foreach ($data['list'] as $key => $value) {
			
			echo '<tr> 
				<td width = "150" valign = "top"> <div >'.$value['TenKH'].' </div> </td>
				<td width = "260" valign = "top"> <div >'.$value['DiaChi'].' </div> </td>
				<td width = "100" valign = "top"> <div >'.$value['SDT'].' </div> </td>
				<td width = "50" valign = "top"> <div align = "center"> <a href = "admin.php?mod=updatekhachhang&ma='.$value['MaKH'].'"> Sửa </a></div> </td>
				<td width = "50" valign = "top"> <div align = "center"> <a href = "admin.php?mod=delkhachhang&ma='.$value['MaKH'].'"> Xóa </a> </div> </td>
			</tr>';
		}
		echo '</table>';
	}
?>